package com.celesea.configuration.redis;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class RedisProperties extends AbstractRedisProperties {
    @Value("${spring.redis.host}")
    private String host;
    @Value("${spring.redis.port}")
    private Integer port;
    @Value("${spring.redis.database}")
    private Integer database;
    @Value("${spring.redis.password}")
    private String password;
    @Value("${spring.redis.timeout}")
    private Integer timeout;
    @Value("${spring.redis.jedis.pool.max-idle}")
    private Integer jedisPoolMaxIdle;
    @Value("${spring.redis.jedis.pool.max-total}")
    private Integer jedisPoolMaxTotal;
    @Value("${spring.redis.jedis.pool.max-wait}")
    private Integer jedisPoolMaxWait;

    @Override
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    @Override
    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
    @Override
    public Integer getDatabase() {
        return database;
    }

    public void setDatabase(Integer database) {
        this.database = database;
    }

    @Override
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public Integer getJedisPoolMaxIdle() {
        return jedisPoolMaxIdle;
    }

    public void setJedisPoolMaxIdle(Integer jedisPoolMaxIdle) {
        this.jedisPoolMaxIdle = jedisPoolMaxIdle;
    }

    @Override
    public Integer getJedisPoolMaxTotal() {
        return jedisPoolMaxTotal;
    }

    public void setJedisPoolMaxTotal(Integer jedisPoolMaxTotal) {
        this.jedisPoolMaxTotal = jedisPoolMaxTotal;
    }

    @Override
    public Integer getJedisPoolMaxWait() {
        return jedisPoolMaxWait;
    }

    public void setJedisPoolMaxWait(Integer jedisPoolMaxWait) {
        this.jedisPoolMaxWait = jedisPoolMaxWait;
    }

    @Override
    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }
}
